<template>
  <div @click="back">退出登录</div>
</template>

<script>
export default {
  methods: {
    back() {
      localStorage.removeItem("token");
      localStorage.removeItem("userId");
      this.$router.replace({ path: "/login" });
    }
  }
};
</script>

<style>
</style>